package model

import "gorm.io/gorm"

type User struct {
	Id         int    `gorm:"column:id;type:int(11);primary_key;AUTO_INCREMENT;comment:用户ID" json:"id"`
	UserName   string `gorm:"column:user_name;type:varchar(255);comment:用户姓名" json:"user_name"`
	User       string `gorm:"column:user;type:varchar(255);comment:账号" json:"user"`
	Phone      string `gorm:"column:phone;type:varchar(255);comment:用户手机号" json:"phone"`
	Pwd        string `gorm:"column:pwd;type:varchar(255);comment:用户密码" json:"pwd"`
	UserImg    string `gorm:"column:user_img;type:varchar(255);comment:用户头像" json:"user_img"`
	UserState  int    `gorm:"column:user_state;type:tinyint(1);comment:用户状态" json:"user_state"`
	TargetId   int    `gorm:"column:target_id;type:int(11);comment:单位ID" json:"target_id"`
	TargetType string `gorm:"column:target_type;type:varchar(255);comment:单位类型" json:"target_type"`
	gorm.Model
}

func (m *User) TableName() string {
	return "user"
}
